//
//  CelloneTab3.m
//  project-A (pianke)
//
//  Created by dllo on 16/1/26.
//  Copyright © 2016年 scott. All rights reserved.
//

#import "CelloneTab3.h"
#import <DKNightVersion.h>
@implementation CelloneTab3

-(void)dealloc{
    
    
    [_labelbiao release];
    [_labelcount release];
    [_labelei release];
    [_labelneirong release];
    [_image release];
    [_zan release];
    
    [super dealloc];
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self creatview];
    }
    return self;
}
-(void)creatview{
    self.labelcount = [[UILabel alloc]init];
        [self.contentView addSubview:self.labelcount];
    [self.labelcount release];
     self.labelcount.dk_textColorPicker = DKColorWithColors([UIColor blackColor], [UIColor whiteColor]);
    self.labelei = [[UILabel alloc]init];
    
     self.labelei.dk_textColorPicker = DKColorWithColors([UIColor blackColor], [UIColor whiteColor]);
    [self.contentView addSubview:self.labelei];
    [self.labelei release];
    
    
    
    self.image = [[UIImageView alloc]init];
       [self.contentView addSubview:self.image];
    [self.image release];
    
    self.labelneirong = [[UILabel alloc]init];
        [self.contentView addSubview:self.labelneirong];
     self.labelneirong.dk_textColorPicker = DKColorWithColors([UIColor blackColor], [UIColor whiteColor]);
    
    [self.labelneirong release];
    
    self.labelbiao = [[UILabel alloc]init];
        [self.contentView addSubview:self.labelbiao];
     self.labelbiao.dk_textColorPicker = DKColorWithColors([UIColor blackColor], [UIColor whiteColor]);
    
    [self.labelbiao release];
    
    self.zan = [[UIImageView alloc]init];
    self.zan.image = [UIImage imageNamed:@"xin"];
    [self.contentView addSubview:self.zan];
    [self.zan release];
    
    self.labelcount = [[UILabel alloc]init];
    [self.contentView addSubview:self.labelcount];
     self.labelcount.dk_textColorPicker = DKColorWithColors([UIColor blackColor], [UIColor whiteColor]);
    [self.labelcount release];
    
}

-(void)layoutSubviews{
    [super layoutSubviews];
    CGFloat width = self.contentView.frame.size.width;
//    CGFloat height = self.contentView.frame.size.height;
    
    self.labelei.frame = CGRectMake(20, 20, width - 40, 15 );
    
        self.image.frame = CGRectMake(20, 55, width - 40, (width - 40) * 0.618f);
    self.labelneirong.frame = CGRectMake(20, 65 + (width - 40) * 0.618f, width - 40, 35);
    
    
    self.labelbiao.frame = CGRectMake(20, 110 +(width - 40) * 0.618f, 100, 20);
    self.zan.frame = CGRectMake(width - 100, 110 +(width - 40) * 0.618f, 20, 20);
    self.labelcount.frame = CGRectMake(width - 70, 110 +(width - 40) * 0.618f, 40, 20);
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
